package com.jews.mongodb.support;

import java.util.Optional;
import java.util.function.Consumer;

/**
 * 操作执行者
 *
 * @author JewsChen
 * @title: Executor
 * @date 2022/11/28 23:21
 */
public interface Executor<T> {

    Optional<T> execute();

    Executor<T> successHook(Consumer<T> consumer);

    Executor<T> errorHook(Consumer<? super Throwable> consumer);
}
